package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.EquipmentMaintenanceMapper;
import com.ruoyi.system.domain.EquipmentMaintenance;
import com.ruoyi.system.service.IEquipmentMaintenanceService;
import com.ruoyi.common.core.text.Convert;

/**
 * 维保记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-07-17
 */
@Service
public class EquipmentMaintenanceServiceImpl implements IEquipmentMaintenanceService 
{
    @Autowired
    private EquipmentMaintenanceMapper equipmentMaintenanceMapper;

    /**
     * 查询维保记录
     * 
     * @param id 维保记录ID
     * @return 维保记录
     */
    @Override
    public EquipmentMaintenance selectEquipmentMaintenanceById(Long id)
    {
        return equipmentMaintenanceMapper.selectEquipmentMaintenanceById(id);
    }

    /**
     * 查询维保记录列表
     * 
     * @param equipmentMaintenance 维保记录
     * @return 维保记录
     */
    @Override
    public List<EquipmentMaintenance> selectEquipmentMaintenanceList(EquipmentMaintenance equipmentMaintenance)
    {
        return equipmentMaintenanceMapper.selectEquipmentMaintenanceList(equipmentMaintenance);
    }

    @Override
    public List<EquipmentMaintenance> selectEquipmentMaintenanceListByType(EquipmentMaintenance equipmentMaintenance) {
        return equipmentMaintenanceMapper.selectEquipmentMaintenanceListByType(equipmentMaintenance);
    }
    /**
     * 新增维保记录
     * 
     * @param equipmentMaintenance 维保记录
     * @return 结果
     */
    @Override
    public int insertEquipmentMaintenance(EquipmentMaintenance equipmentMaintenance)
    {
        return equipmentMaintenanceMapper.insertEquipmentMaintenance(equipmentMaintenance);
    }

    /**
     * 修改维保记录
     * 
     * @param equipmentMaintenance 维保记录
     * @return 结果
     */
    @Override
    public int updateEquipmentMaintenance(EquipmentMaintenance equipmentMaintenance)
    {
        return equipmentMaintenanceMapper.updateEquipmentMaintenance(equipmentMaintenance);
    }

    /**
     * 删除维保记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteEquipmentMaintenanceByIds(String ids)
    {
        return equipmentMaintenanceMapper.deleteEquipmentMaintenanceByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除维保记录信息
     * 
     * @param id 维保记录ID
     * @return 结果
     */
    @Override
    public int deleteEquipmentMaintenanceById(Long id)
    {
        return equipmentMaintenanceMapper.deleteEquipmentMaintenanceById(id);
    }
}
